package zuoye;

import java.util.ArrayList;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        ArrayList<String>list1=new ArrayList<>();
        ArrayList<String>list2=new ArrayList<>();
        System.out.println("请输入学生基本信息");
        while(true){
            String s1=sc.next();
            String news=getstring(s1);
            list1.add(news);
            if(s1.equals("end")){
                break;
            }
        }
        System.out.println("请输入学生成绩");
        int i=0;
        while(true){
            String s2=sc.next();
            String news=getstring(s2);
            list2.add(news);
            if(s2.equals("end")){
                for( i=0;i< list1.size();i++) {
                    String cj=subchengji(s2);
                    System.out.println(list1.get(i) + cj);
                }
                break;
            }

        }



    }
    public static String getstring( String s1){
        return s1.replaceAll(",","");
    }
    public static String subchengji(String s2){
        return s2.substring(10,12);
    }
}
